//
//  YSMineCell.m
//  Yueshi
//
//  Created by Northwan on 15/8/29.
//  Copyright (c) 2015年 悦食中国. All rights reserved.
//

#import "YSMineCell.h"

@interface YSMineCell()
@property (weak, nonatomic) IBOutlet UIImageView *iconView;
@property (weak, nonatomic) IBOutlet UILabel *itemName;
@property (weak, nonatomic) IBOutlet UIImageView *badgeView;

@end

@implementation YSMineCell

+(instancetype)cellWithTableView:(UITableView *)tableview{
    static NSString *CellIdentiferId = @"YSMineCell";
    YSMineCell *cell =  [tableview dequeueReusableCellWithIdentifier:CellIdentiferId];
    return cell;
}

-(void)setItemModel:(YSMineItemModel *)itemModel{
    _itemModel = itemModel;
    [self.iconView setImage:[UIImage imageNamed:itemModel.iconName]];
    [self.itemName setText:itemModel.itemName];
    self.badgeView.hidden = !itemModel.hasNew;
}

@end
